package yws01.Business;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import yws01.DAO.DongtaicheweiDAO;
import yws01.Model.Chewei;
import yws01.Model.Dongtaichewei;

import java.util.List;

@Service
public class SaleServiceDongtaichewei {

    DongtaicheweiDAO dongtaicheweiDAO;

    @Autowired
public void setDongtaicheweiDAO(DongtaicheweiDAO dongtaicheweiDAO) { this.dongtaicheweiDAO = dongtaicheweiDAO; }

    @Transactional
    public void Dongtaicheweiinsrt(Dongtaichewei dongtaichewei){dongtaicheweiDAO.insertDongtaichewei(dongtaichewei);}
    public Dongtaichewei Dongtaicheweiquery(Dongtaichewei dongtaichewei){
        System.out.println(dongtaicheweiDAO.queryDongtaichewei(dongtaichewei));
    return dongtaicheweiDAO.queryDongtaichewei(dongtaichewei);}
    public Dongtaichewei Dongtaicheweiquery1(Dongtaichewei dongtaichewei){
        System.out.println(dongtaicheweiDAO.queryDongtaichewei1(dongtaichewei));
        return dongtaicheweiDAO.queryDongtaichewei1(dongtaichewei);}
    public List<Dongtaichewei> Dongtaicheweiall(Dongtaichewei dongtaichewei){return dongtaicheweiDAO.queryall(dongtaichewei);}
    public void Dongtaicheweimodify(Dongtaichewei dongtaichewei){dongtaicheweiDAO.modifyDongtaichewei(dongtaichewei);}
}
